<?php 
//引进配置信息
include 'include/init.php';
//引入数据库配置信息
include 'include/mysql.config.php';
//引入公共函数
include 'include/common.fun.php';
include 'data/common_data.php';


if(!isset($_COOKIE['user_login']) || $_COOKIE['user_login']!=1){
	alert('请登录','user_login.php');
}

$id = $_COOKIE['user_id'];
$sql="SELECT * from wd_user where user_id=$id";
$user=$db->getOne($sql);

$current=isset($_GET['page'])?$_GET['page']:1;

$sql='SELECT COUNT(msg_id) as count from wd_message';
$page_list=$db->getOne($sql);
$count=$page_list['count'];

$limit=5;
$start=($current-1)*$limit;
$size=3;
$page = new Page($current,$count1,$limit,5);
$page_link = $page->first()->prev()->num()->next()->show();


$sql="SELECT * from wd_message order by msg_addtime desc limit $start,$limit";
$msg=$db->getAll($sql);
//加载视图页面
include 'view/user_msg.php';




 ?>